From: awilliam@xenbuild2.aw Date: Thu, 22 Mar 2007 15:28:05 +0000 (-0600) Subject: [IA64] Improve error message when HVM domain creation failed X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15281 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=664ebb9efc1a85fa89a128669dc94e5279fc1e05;p=xen.git [IA64] Improve error message when HVM domain creation failed Signed-off-by: Masaki Kanno --- diff --git a/xen/arch/ia64/vmx/vmmu.c b/xen/arch/ia64/vmx/vmmu.c index 917f274bf9..ee456c030e 100644 --- a/xen/arch/ia64/vmx/vmmu.c +++ b/xen/arch/ia64/vmx/vmmu.c @@ -136,8 +136,7 @@ static int init_domain_vhpt(struct vcpu *v) page = alloc_domheap_pages (NULL, VCPU_VHPT_ORDER, 0); if ( page == NULL ) { printk("No enough contiguous memory for init_domain_vhpt\n"); - - return -1; + return -ENOMEM; } vbase = page_to_virt(page); memset(vbase, 0, VCPU_VHPT_SIZE); @@ -171,15 +170,17 @@ int init_domain_tlb(struct vcpu *v) { struct page_info *page; void * vbase; + int rc; - if (init_domain_vhpt(v) != 0) - return -1; + rc = init_domain_vhpt(v); + if (rc) + return rc; page = alloc_domheap_pages (NULL, VCPU_VTLB_ORDER, 0); if ( page == NULL ) { printk("No enough contiguous memory for init_domain_tlb\n"); free_domain_vhpt(v); - return -1; + return -ENOMEM; } vbase = page_to_virt(page); memset(vbase, 0, VCPU_VTLB_SIZE); diff --git a/xen/arch/ia64/vmx/vmx_init.c b/xen/arch/ia64/vmx/vmx_init.c index 10daa5c424..65c62f6454 100644 --- a/xen/arch/ia64/vmx/vmx_init.c +++ b/xen/arch/ia64/vmx/vmx_init.c @@ -295,6 +295,7 @@ int vmx_final_setup_guest(struct vcpu *v) { vpd_t *vpd; + int rc; vpd = alloc_vpd(); ASSERT(vpd); @@ -306,8 +307,9 @@ vmx_final_setup_guest(struct vcpu *v) * to this solution. Maybe it can be deferred until we know created * one as vmx domain */ #ifndef HASH_VHPT - if (init_domain_tlb(v) != 0) - return -1; + rc = init_domain_tlb(v); + if (rc) + return rc; #endif vmx_create_event_channels(v);